import { request } from '@inbiz/utils';
const version = InbizConfig.API_VERSION

// 获取消息记录
export async function getMessage(params: any) {
  return request(
    `/inbiz/api/services/front/msgengine/v${version}/message/message`,
    {
      method: 'POST',
      data: params,
    },
  );
}

//  消息已读
export async function setReaded(params: any) {
  return request(
    `/inbiz/api/services/front/msgengine/v${version}/message/setMsgRead`,
    {
      method: 'POST',
      data: params,
    },
  );
}

// 获取消息分组
export async function getMessageGroup(params: any) {
  return request(
    `/inbiz/api/services/front/msgengine/v${version}/message/groupMsg`,
    {
      method: 'POST',
      data: params,
    },
  );
}

// 根据应用获取分组
export async function getMessageAllGroup(params: any) {
  return request(
    `/inbiz/api/services/front/msgengine/v${version}/msgGroup/groupsPageList`,
    {
      params,
    },
  );
}